﻿using Autofac.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace SuperJoe.Framework.Ioc
{
    public interface IIocContainer
    {
        object Resolve(Type type, string name = null, IEnumerable<ConstructorParameter> parameters = null);

        T Resolve<T>(string name = null, IEnumerable<ConstructorParameter> parameters = null);

        IEnumerable<T> ResolveAll<T>();

        IIocContainer RegisterInstance<TService>(TService instance, string name = null) where TService : class;

        IIocContainer RegisterType<TService, TImplemetation>(string name = null) where TImplemetation : TService;

        IIocContainer RegisterType<TImplemetation>(string name = null);

    }
}
